move append-modified-pairs to segments and rename it append-on-assoc