update motorRoutine()