added extra color check