add es6 generators support