make canvas into global variable