merging preprocess and qc stages to reduce data movement