started refactoring the collectionhandler