support for promises (#11)