middle of a bad refactor