modified index to main