implimenting mongo db interface