Button state change help

the code above naturally debounces the input