cleaning up the refactor