Added max speed constraint