first step in refactoring complete