Working on the button click mechanism