updated some structure for the click event