refactored collection routine