change pattern mode