Instead of needing to `compact` here (as a result of adding the `next` above), I believe it would be cleaner to use `select` instead of `map`.