code review refactors