add moter controller code