2 functions and modify canvas.go