adds resize window handler