todo: find_ranges with length and filter queries/callbacks