fixing a poorly planned refactor