Get rid of ternary conditional