Replaced ternary operators