mongodb datastore implementation