added java class for maths