Changed cond into a map lookup.