re-instating heatmap update code