updated for Mongoose 3.5.4