udpated to mongoose