Added some code to CollectionAdapter