changing viewport setup, listening to resize event