data preprocessing script