for sync code