add support for cancelling deferreds