partly implemented the collection generator