added resize event to template