revised click event