switched ternary statement