got a funct
done BUT need to fix duty cycles later