working on mongo refactor