rewrite makefile and fix header