More compact if/else structure