added button click handling