it'd make me happier if this didn't use the conditional operator, although this is a cleaner usage than most.