delete main method and class declaration and modification to script groovy