updating index for initial page load