Modified to use Mongoose ODM