Make some comments and revise some variables to make the program easier to read and understand. Variable index is changed to col.