changed ternary statement