refactoring begins