further reduced repitition in the low-level JTAG code