refractor: make the button controle the event