def get_max_range(x, tolerance):
    """Returns the indices and values for all values >= tolerance*maximum"""
    max_indices = []
    max_values = [] 
    max_value = max(x)

    for k,elem in enumerate(x):
        if elem >= tolerance*max_value:
            max_values.append(elem)
            max_indices.append(k)

    return [max_indices, max_values]