refactor CollectionSpec