integrated with makefile and added comments