added storeOffsetsWithPositions