updates based on code review feedback