remove ternary operation