code review and comments done!