how to do without if? ternary?