Added debug print statements to try to figure out why we are getting an out of bounds error when doing the ordering