prepare for diode test; minor refact