changed duty cycle to int