Added dymanic sizing of canvas