fixed hard coded maths