refactor to make testing easier