add generator params and {next,done}