put the click event on the button rather than
the whole view