implemented and documented preprocess function
started including the preprocess function