implement basic sync logic