change mongodb module to mongoosejs