Modelling trihalomethanes formation in water supply systems