Updating index with right structure