bad refactor