updated code for new motors