finished pwm initial

still contains test code