added toggle for click events