mid-refactor