fully working sync - modified algo