function out_result = loadSummary(file, points)
f1 = fopen(file);
c = textscan(f1, '%d', 3);
data_rows = c{1}(1);
data_cols = c{1}(2);
data_blocks = c{1}(3);

if nargin < 2
    out_cols = data_cols;  
else
    out_cols = numel(points);
end
load_means = zeros(data_blocks-2, out_cols);  
header = zeros(1, out_cols);
for block = 1:data_blocks
    % consume end of line
    textscan(f1, '%s', 1, 'Delimiter', '\n');

    % get label
    c = textscan(f1, '%s', 1, 'Delimiter', '\n');
    data_label = char(c{1});
    
    % skip query time data block;
    if strcmp(data_label, 'Query Time')
        textscan(f1, '%s', data_rows-1, 'Delimiter', '\n');
        continue
    end
    c = textscan(f1, '%f', data_cols);
    x_vals = cell2mat(c);
    
    % pre-allocate data matrix; rows is one less, because x-vals header
    block_data = zeros(data_rows-1, data_cols);
    
    % fill out matrix
    for row = 2:data_rows
        row_data = textscan(f1, '%f', data_cols);
        block_data(row-1,:) = cell2mat(row_data);
    end
    y_vals = mean(block_data);
    
    % calculate 95% confidence interval
    upper = zeros(data_cols,1);
    lower = zeros(data_cols,1);
    for i = 1:data_cols
        pd = fitdist(block_data(:,i), 'Normal');
        ci = paramci(pd);
        lower(i) = y_vals(i) - ci(1,1);
        upper(i) = ci(2,1) - y_vals(i);
    end
        
    % if it's the CSI load block, don't output to graph; just return it
    if strcmp(data_label, '99% Query Time')
        continue
    end
    
    if nargin < 2
        load_means(block-2,:) = y_vals;
        header = x_vals;
    else
        header = points;
        curr_point_idx = 1;
        for i = 1:numel(y_vals)
            if curr_point_idx > numel(points)
                break
            end
            if x_vals(i) == points(curr_point_idx)
                load_means(block-2, curr_point_idx) = y_vals(i);
                curr_point_idx = curr_point_idx + 1;                
            end
        end
    end
end

tot_mean = mean(load_means);
%tot_stdev = std(load_means);
tot_stdev = max(load_means) - min(load_means);

out_result = zeros(2, out_cols*2);
for i = 1:numel(tot_mean)
    out_result(1, 2*i-1) = header(i);
    out_result(1, 2*i) = header(i);
    out_result(2, 2*i-1) = tot_mean(i);
    out_result(2, 2*i) = tot_stdev(i);
end

fclose(f1);
end