implementing process node to extract segment pairs