renamed sync code