privatized the canvas variables