script to generate heatmaps