changing connection to mongoose