pattern operations