Changed check to use truth table match