add groovy iterative solution as a test