began refactor