update based on code review