Add ability to loop through all patterns.