Add support for promises