cleaning up some of the math.