use custom wrapper instead of Promise.resolve