Add dynamic index switching