addressed the comments on code review