change to using dictionary to store pattern options