simplified sync code