add preprocess to input