format and heatmap changes

using js format
change the way heatmap is built