add sample pre process