working pwm, next task: create a generic model