patching promises