added makefile, and code changes