added new preprocess method