Added function to set the window size