added groovy mode.