changes made for code review and new code made in iteration 2