some maths hmetasks
some logic changes