added -lm to Makefile