adding loading gif while  promises are active