requires es6 generators