add conflict checking to sync