extended the example by using exposed groovy class and method