refactoring to collection interface