why not do a `collect` or `map` doing the `selection` and the adding the attribute in one loop?