index i was ambiguous; changed counter for sentences to j