add code for handling SIGWINCH