this can also use ternary operator as the above