finished program
modified index