There are two `when`. Also, it's not clear what `its smallest key is larger than the number` means? I think it's just because your `units` hash does not contain the searched key, not actually because of `smallest` vs `larger`, not?