finish partial refactor that broke everything