pre refactoring branch