instruments: attempt at making one function that works in both output defs