Preprocessing the dataset