removed unneeded code in promises.