detects cells clicked on properly