Updated preprocess and postprocess