Use if statements instead of ternary