rewritten Thumbbot to make use of ES6 generators