use moongoose toObject method