some maths here