group term now contains end index

no unpacking of the group table is required to check if a group ends,
also allows for the upcoming per character appending optimization