Changed the method to run the JS script of Mongo