Added iterator utility method sample rule to use carp etc