added canvas code