update the way to connect mongo