add assertions
tune assertions
split html template to "stat.html"