better check if segment exists