add drawcubs function and update html for drawing