makes a mongoose plugin