finished up iterating with indexes