startIndex changed to firstIndex