keep track window height and width when resizing the window