move some stuff to initMotor