merged in examples from Making Java Groovy chapter 6