learning routes with segments