added dc motor control