Script for data preparation