Adding an action to the button.