some refactor preparation for MongoRepo