Implement patternShift