what is the purpose of using the diode as a rectifier diode