gen
Flatten a little bit with promises