finish synchronous version