voltage: outsource printing code