separated files into .h, .cpp and added makefile