fixed reversed diode and removed motor R