refactoring of SelectionItemPattern and SelectionPattern