Ranges functioning