debugging output for ranges, checking sorting