more work on mongo refactor