moved heatmap initialization into heatmap