better "button" handling