added extendedMath
move stuff around
move stuff around