added some maths