Placed the viewport vars to the function