tidying
translated example 9 to groovy
translated Example 10 to groovy
tidy