Added more features to math.mod