updates index as table