began refactoring