added Controller and Motor function