max speed, next point logic and taskdiagramm