fixed test cases using the deprecated math.mod() method.