Rearrange the order of pwm functions