added new function to generate heatmaps.