finishing the index and list