creating mongodb connections