Promise polyfill

renaming variables in accordance with the terminology