added functionality to clear the canvas