first step refactoring