Created helper function for click event