adjust conditions for sending and displaying the click event