improve the promise wrapping a bit