add diode and transistor