creating an adapter for mongodb