prior to refactoring