I'd suggest using Groovy's nifty exclusive ranges (http://snipplr.com/view/2197/groovy-series-ranges/) instead of the -1 here.