stage2: basic preprocessing