starting refactoring