Add support for promises.