organized code using header files and makefile