fixed bug, cleaned up makefile