consolidate subprocess import from previous merge