first version of js-promise