v1.1 added resize event listener