just some pointers, and my debouncing functions