still working on refactor