Promise/A-Plus implementation