addressed issues raised in the code review