changes for click detection.