more refactoring Promise to conform to the changes in Core API