fixed defiinition of sync wrap method