changed ternary a bit