Refactored to make the creation of new iteration rules easier