updated project with comments and code restructure