corrected the mongodb connection