optimizing the Promise.when behavior a bit more