I agree this is ugly.. I couldn't come up with nice way to iterate all tuples to check compatibility