modified preprocessing order