solutions to code kata using groovy