switch patterns