added preprocess function to aup_implementation