connection to mongo and cleaning data