refactor the canvas view controller