refactoring of collections