starting to write my own version of heatmap.js