remove ternary operator