extracted z speed control part