added color comparisons in chaining