Added buttonClick functionality