pull from jpromise library for promises