added support for readRanges