changed code for new motor driver