pre-refactor