range-related functions