add ternary operator

add ternary operator