patter code