finish basic segment handling