function for calculating water usage