working on yet another refactor