added resize event and width/height