change the pattern of gate