updating the canvas box