Script to preprocess data