Some changes to sch_by_trip()