Use the appropriate operator<< instead of addRanges.