add 'or' and 'and' patterns