applying stashed changes for adding segment pair ends. WIP