code fix after initial code review