used kineticJs to write the canvas