update based on code review feedback