added getRangeLength
example update