implements basic generator