added click function for tags