use ternary statement instead