updating the viewport