Corrected and DI to DO
Forgot to add a function on loop section