added default value to canvas code