Added functionality for updating index