Preparing the data