collections refactoring