separated addRects from draw function in heatmap