added prefixes and suffixes for groups
made getNextGroup and getNextGroup public