makefile now works on cluseter (added -lm), also fixed input control