removing redundant ternary operators.