set up connections to mongodb