tweaks to PWM and encoder methods