max number of stops implementation