Added Groovy implementation