creates a mongodb instance