fixed query so it sorts the toa in a stop