streamlined output code
fix glitches by busy waiting in ISR; need to revisit this