addressing issues raised in code review