automate the dosing of chemicals