add resize event handler