pattern order matters; use lists instead of sets.