change Makefile, refactoring