created Makefile, fixed bug