added promise fix