Refactored while_some