you can refactor the for loop into something like for(val in 0..crossoverPointMax-1) and refer to val where you would crossoverPointMin; this would be a more GROOVY way to write it (although optional)