added method to execute javascript code on mongodb server