Added Professor Samson's updated index code