connects successfully to mongoDB