added reject or not reject and renamed resolve a promise to fulfill