added mod to maths