diff --git a/report.html b/report.html
index b82cbbd..5e78689 100644
--- a/report.html
+++ b/report.html
@@ -1,11 +1,66 @@
 <!DOCTYPE html>
 <html>
 <head>
-  <title>Report</title>
+    <title>Report</title>
+    <link rel="stylesheet"
+          href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
 </head>
 
 <body>
-%(body)s
+<div class="page-header text-center">
+  <h2>Performance Report</h2>
+</div>
+<div class="container">
+    <div class="row">
+        <table style="width: auto;" class="table table-bordered table-striped">
+            <tr>
+                <td>Test</td>
+                <td>Iops</td>
+                <td>Latency</td>
+            </tr>
+            <tr>
+                <td>rand read 4k</td>
+                <td>{data[rand_read_4k][iops][0]}&#32;&plusmn;&#32;{data[rand_read_4k][iops][1]}</td>
+                <td>{data[rand_read_4k][lat]}</td>
+            </tr>
+            <tr>
+                <td>rand write 4k</td>
+                <td>{data[rand_write_4k][iops][0]}&#32;&plusmn;&#32;{data[rand_write_4k][iops][1]}</td>
+                <td>{data[rand_write_4k][lat]}</td>
+            </tr>
+            <tr></tr>
+        </table>
+    </div>
+    <div class="row">
+        <table>
+            <tr>
+                <td><img src={urls[0]}></td>
+                <td><img src={urls[1]}></td>
+            </tr>
+        </table>
+    </div>
+
+    <div class="row">
+        <table style="width: auto;" class="table table-bordered table-striped">
+            <tr>
+                <td>Disk total</td>
+                <td>{lab_info[total_disk]}</td>
+            </tr>
+            <tr>
+                <td>Memory total</td>
+                <td>{lab_info[total_memory]}</td>
+            </tr>
+            <tr>
+                <td>Nodes count</td>
+                <td>{lab_info[nodes_count]}</td>
+            </tr>
+            <tr>
+                <td>CPU count</td>
+                <td>{lab_info[processor_count]}</td>
+            </tr>
+        </table>
+    </div>
+</div>
 </body>
 
 </html>
\ No newline at end of file
diff --git a/wally/report.py b/wally/report.py
index d2f2d96..d191428 100644
--- a/wally/report.py
+++ b/wally/report.py
@@ -2,151 +2,16 @@
 import sys
 
 from wally import charts
-from wally.statistic import med_dev
+from wally.statistic import med_dev, round_3_digit, round_deviation
 from wally.utils import parse_creds
 from wally.suits.io.results_loader import filter_data
 from wally.meta_info import total_lab_info, collect_lab_data
 
 
-# from collections import OrderedDict
-# from wally.suits.io import formatter
-# def pgbench_chart_data(results):
-#     """
-#     Format pgbench results for chart
-#     """
-#     data = {}
-#     charts_url = []
-
-#     formatted_res = formatters.format_pgbench_stat(results)
-#     for key, value in formatted_res.items():
-#         num_cl, num_tr = key.split(' ')
-#         data.setdefault(num_cl, {}).setdefault(build, {})
-#         data[keys[z]][build][
-#             ' '.join(keys)] = value
-
-#     for name, value in data.items():
-#         title = name
-#         legend = []
-#         dataset = []
-
-#         scale_x = []
-
-#         for build_id, build_results in value.items():
-#             vals = []
-#             OD = OrderedDict
-#             ordered_build_results = OD(sorted(build_results.items(),
-#                                        key=lambda t: t[0]))
-#             scale_x = ordered_build_results.keys()
-#             for key in scale_x:
-#                 res = build_results.get(key)
-#                 if res:
-#                     vals.append(res)
-#             if vals:
-#                 dataset.append(vals)
-#                 legend.append(build_id)
-
-#         if dataset:
-#             charts_url.append(str(charts.render_vertical_bar
-#                               (title, legend, dataset, scale_x=scale_x)))
-#     return charts_url
-
-# def build_lines_chart(results, z=0):
-#     data = {}
-#     charts_url = []
-
-#     for build, res in results:
-#         formatted_res = formatters.get_formatter(build)(res)
-#         for key, value in formatted_res.items():
-#             keys = key.split(' ')
-#             data.setdefault(key[z], {})
-#             data[key[z]].setdefault(build, {})[keys[1]] = value
-
-#     for name, value in data.items():
-#         title = name
-#         legend = []
-#         dataset = []
-#         scale_x = []
-#         for build_id, build_results in value.items():
-#             legend.append(build_id)
-
-#             OD = OrderedDict
-#             ordered_build_results = OD(sorted(build_results.items(),
-#                                        key=lambda t: ssize_to_b(t[0])))
-
-#             if not scale_x:
-#                 scale_x = ordered_build_results.keys()
-#             dataset.append(zip(*ordered_build_results.values())[0])
-
-#         chart = charts.render_lines(title, legend, dataset, scale_x)
-#         charts_url.append(str(chart))
-
-#     return charts_url
-
-# def build_vertical_bar(results, z=0):
-#     data = {}
-#     charts_url = []
-#     for build, res in results:
-#         formatted_res = formatter.get_formatter(build)(res)
-#         for key, value in formatted_res.items():
-#             keys = key.split(' ')
-#             data.setdefault(keys[z], {}).setdefault(build, {})
-#             data[keys[z]][build][
-#                 ' '.join(keys)] = value
-
-#     for name, value in data.items():
-#         title = name
-#         legend = []
-#         dataset = []
-
-#         scale_x = []
-
-#         for build_id, build_results in value.items():
-#             vals = []
-#             OD = OrderedDict
-#             ordered_build_results = OD(sorted(build_results.items(),
-#                                        key=lambda t: t[0]))
-#             scale_x = ordered_build_results.keys()
-#             for key in scale_x:
-#                 res = build_results.get(key)
-#                 if res:
-#                     vals.append(res)
-#             if vals:
-#                 dataset.append(vals)
-#                 legend.append(build_id)
-
-#         if dataset:
-#             charts_url.append(str(charts.render_vertical_bar
-#                               (title, legend, dataset, scale_x=scale_x)))
-#     return charts_url
-
-
 def render_html(charts_urls, dest, lab_description, info):
     templ = open("report.html", 'r').read()
-    body = "<a href='#lab_desc'>Lab description</a>" \
-           "<ol>{0}</ol>" \
-           "<div>{1}</div>" \
-           '<a name="lab_desc"></a>' \
-           "<div><ul>{2}</ul></div>"
-    table = "<table><tr><td>{0}</td><td>{1}</td></tr>" \
-            "<tr><td>{2}</td><td>{3}</td></tr></table>"
-    ul = []
-    ol = []
-    li = '<li>{0} : {1}</li>'
-
-    for elem in info:
-        ol.append(li.format(elem.keys(), elem.values()))
-
-    for key in lab_description:
-        value = lab_description[key]
-        ul.append("<li>{0} : {1}</li>".format(key, value))
-
-    charts_urls = ['<img src="{0}">'.format(url) for url in charts_urls]
-
-    body = body.format('\n'.join(ol),
-                       table.format(*charts_urls),
-                       '\n'.join(ul))
-
-    open(dest, 'w').write(templ % {'body': body})
+    open(dest, 'w').write(templ.format(urls=charts_urls,
+                                       data=info, lab_info=lab_description))
 
 
 def io_chart(title, concurence, latv, iops_or_bw, iops_or_bw_dev,
@@ -194,16 +59,18 @@
         io_test_suite_res = test_suite_data['res']
 
         charts_url = []
-        info = []
+        max_info = {}
 
         name_filters = [
-            ('hdd_test_rrd4k', ('concurence', 'lat', 'iops'), 'rand_read_4k'),
-            ('hdd_test_swd1m', ('concurence', 'lat', 'bw'), 'seq_write_1m'),
-            ('hdd_test_srd1m', ('concurence', 'lat', 'bw'), 'seq_read_1m'),
-            ('hdd_test_rws4k', ('concurence', 'lat', 'bw'), 'rand_write_1m')
+            ('hdd_test_rrd4k', ('concurence', 'lat', 'iops'),
+             'rand_read_4k', 'random read 4k'),
+            # ('hdd_test_swd1m', ('concurence', 'lat', 'bw'), 'seq_write_1m'),
+            # ('hdd_test_srd1m', ('concurence', 'lat', 'bw'), 'seq_read_1m'),
+            ('hdd_test_rws4k', ('concurence', 'lat', 'iops'),
+             'rand_write_4k', 'random write 4k')
         ]
 
-        for name_filter, fields, fname in name_filters:
+        for name_filter, fields, fname, desc in name_filters:
             th_filter = filter_data(name_filter, fields)
 
             data = sorted(th_filter(io_test_suite_res.values()))
@@ -214,14 +81,20 @@
             iops_or_bw_v, iops_or_bw_dev_v = zip(*map(med_dev, iops_or_bw_v))
             latv, _ = zip(*map(med_dev, latv))
 
-            url = io_chart(name_filter, concurence, latv, iops_or_bw_v,
+            url = io_chart(desc, concurence, latv, iops_or_bw_v,
                            iops_or_bw_dev_v,
                            fields[2], fname)
-            info.append(dict(zip(fields, (concurence, latv, iops_or_bw_v))))
+            max_lat = "%s msec" % round_3_digit(max(latv) / 1000)
+            max_iops_or_bw = max(iops_or_bw_v)
+            max_iops_or_bw_dev = iops_or_bw_dev_v[
+                iops_or_bw_v.index(max_iops_or_bw)]
+            r = round_deviation((max_iops_or_bw, max_iops_or_bw_dev))
+            max_info[fname] = {fields[2]: r,
+                                 "lat": max_lat}
             charts_url.append(url)
 
         if len(charts_url) != 0:
-            render_html(charts_url, path, lab_info, info)
+            render_html(charts_url, path, lab_info, max_info)
 
 
 def main(args):
