Less nested, possibly better performance

Promise.