allowed for dynamic resizing of canvas with window