revised controller as groovy scriptable controller