added motor encoder