diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,3 +31,6 @@
 
 * Third version revised C. Fixed issue with group classification for empty data.
 
+## 0.3.4.0 -- 2020-11-28
+
+* Third version revised D. Added new functions to the module Phonetic.Languages.Simplified.DataG. Fixed issues with group classification for empty data.
diff --git a/Phonetic/Languages/Simplified/DataG.hs b/Phonetic/Languages/Simplified/DataG.hs
--- a/Phonetic/Languages/Simplified/DataG.hs
+++ b/Phonetic/Languages/Simplified/DataG.hs
@@ -70,6 +70,7 @@
 
 -----------------------------------------------------------------------------------
 
+-- | The second argument must be not empty for the function to work correctly.
 innerPartitioning
   :: (InsertLeft t2 (t a), Monoid (t2 (t a)), InsertLeft t2 c, Monoid (t2 c), Ord c) => FuncRep2 (t a) b c
   -> t2 (t a)
@@ -77,6 +78,13 @@
 innerPartitioning !frep2 data0 =
   let !l = F.maximum . mapG (toTransMetrices' frep2) $ data0 in partitionG ((== l) . getAC frep2) data0
 
+-- | The second argument must be not empty for the function to work correctly.
+innerPartitioningR
+  :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c, Monoid (t2 c), Ord c) => t2 (Result t a b c)
+  -> (t2 (Result t a b c), t2 (Result t a b c))
+innerPartitioningR dataR =
+  let !l = F.maximum . mapG transMetrices $ dataR in partitionG ((== l) . transMetrices) dataR
+
 maximumGroupsClassification
   :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord c, InsertLeft t2 c, Monoid (t2 c), Integral d) => d
   -> FuncRep2 (t a) b c
@@ -98,16 +106,24 @@
  | nGroups <= 0 = innerPartitioning frep2 data0
  | otherwise = maximumGroupsClassification (nGroups - 1) frep2 . innerPartitioning frep2 $ data0
 
+maximumGroupsClassificationR2
+  :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), Ord c, InsertLeft t2 c, Monoid (t2 c), Integral d) => d
+  -> (t2 (Result t a b c), t2 (Result t a b c))
+  -> (t2 (Result t a b c), t2 (Result t a b c))
+maximumGroupsClassificationR2 !nGroups (dataT,dataF)
+ | F.null dataF = (dataT,mempty)
+ | nGroups <= 0 = (dataT,dataF)
+ | otherwise = maximumGroupsClassificationR2 (nGroups - 1) (dataT `mappend` partT,partF)
+     where (!partT,!partF) = innerPartitioningR dataF
+
 maximumGroupsClassificationR
   :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c, Monoid (t2 c), Ord c, Integral d) => d
   -> t2 (Result t a b c)
   -> (t2 (Result t a b c), t2 (Result t a b c))
 maximumGroupsClassificationR !nGroups dataR
  | F.null dataR = (mempty,mempty)
- | nGroups <= 1 = (partT,partF)
- | otherwise = (partT `mappend` (fst . maximumGroupsClassificationR (nGroups - 1) $ partF),snd . maximumGroupsClassificationR (nGroups - 1) $ partF)
-     where !maxE0 = F.maximum . mapG transMetrices $ dataR
-           (!partT,!partF) = partitionG ((== maxE0) . transMetrices) dataR
+ | nGroups <= 0 = innerPartitioningR dataR
+ | otherwise = maximumGroupsClassificationR2 (nGroups - 1) . innerPartitioningR $ dataR
 
 toResultR
   :: FuncRep2 (t a) b c
diff --git a/phonetic-languages-simplified-common.cabal b/phonetic-languages-simplified-common.cabal
--- a/phonetic-languages-simplified-common.cabal
+++ b/phonetic-languages-simplified-common.cabal
@@ -3,7 +3,7 @@
 -- http://haskell.org/cabal/users-guide/
 
 name:                phonetic-languages-simplified-common
-version:             0.3.3.0
+version:             0.3.4.0
 synopsis:            A simplified version of the phonetic-languages-functionality
 description:         A simplified version of the phonetic-languages-functionality. Tries to use only necessary functionality and reduce the other one.
 homepage:            https://hackage.haskell.org/package/phonetic-languages-simlified-common
