moved include and changed to C++ (cmath instead of math.h)