Slight rewrite of a cond.