added ability to resize canvas with update()