add brackets round ternary operator