added DOMtoCanvas and canvasToDOM