reverting to calculating the avg time on the fly in html