ternary operator vs if else statement