Data set up for sorting