updating viewport