set sync before promise returned