Note the program can only output up to 500 slices of data. If there are more than 500 sets of start and end times found in the RANGE_OBJECT the program stops after putting the 500 sets into RANGES and outputs a warning message.