changed rangeException to rangeError