fixes to arith fuctions to homework compliant