unfinished work on refactor