implemented resize events