spy: enhance generator. close #3