add codes for click method