fixes up null or nan...now time to fix the math