Rewriten on Groovy