updated the output to resize correctly on page load