updating canvas size