add event upon window resize named function