this is going to iterate through the rows and get x and y values for each row. so its necessary