pre refactoring