replication sync algorithms; fix old post's mangling