migrating maths helper classes