further updated preprocess