refactoring pt2