add Motor drive code