some thoughts on promises and APIs