Setup ternary condition

Setup ternary condition