update the main index