complete undo function heatmap visualization and modified javascript file