Finding the range of data