exercise 4 edited into a groovy file