changed motor code