change promise scope