refactored makefile