add control motor code