updated some maths