add range version of setExtension