custom scripts for MongoDB