changes to allow readRanges