Putting endIndex back in the protocol