Added better data set handling