modified:   canvas.js