added canvas resize option