track resize event as well