fixed promise usage