updated the click behavior