preprocessing phase added