Implemented resize event