turn if conditional to ternary