add main.h and change Makefile