added promise use

change some callback with promise