very nice way to avoid the condition in `collect`