implemented hasSameColor #PH-3