added connetion to mongodb and main model