refactoring + code review