added some comments to Collection
removed $ parameter in isValid method