simple generator working