added support for debounced buttons