Implemented randomized patterns.