implemented simple generator scheme