Adding preprocess() call to legacy functions