wiring up index to use dynamic values