some experiments with promises and generators