use addEventListener to bind on resize event