add event at resizing