abstract the mongodb module