added -lm linking
updated TODO