minor diode test refact