basic structure, and partial implementation of generative procedure