all calculations in utils