more code review refactoring