Changed the program to reflect better index's