diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,3 +22,7 @@
 
 * Third version revised A. Added new functions to the module Phonetic.Languages.Simplified.DataG. Switched to the strict variants of the functions in the
 first arguments.
+
+## 0.3.2.0 -- 2020-11-28
+
+* Third version revised B. Some code improvements. Changed the maximumGroupsClassificationR arguments.
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
@@ -71,14 +71,14 @@
 -----------------------------------------------------------------------------------
 
 innerPartitioning
-  :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord c) => FuncRep2 (t a) b c
+  :: (InsertLeft t2 (t a), Monoid (t2 (t a)), InsertLeft t2 c, Monoid (t2 c), Ord c) => FuncRep2 (t a) b c
   -> t2 (t a)
   -> (t2 (t a), t2 (t a))
 innerPartitioning !frep2 data0 =
-  let !l = getAC frep2 . F.maximumBy (\x y -> compare (getAC frep2 x) (getAC frep2 y)) $ data0 in partitionG ((== l) . getAC frep2) data0
+  let !l = F.maximum . mapG (toTransMetrices' frep2) $ data0 in partitionG ((== l) . getAC frep2) data0
 
 maximumGroupsClassification
-  :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord c, Integral d) => d
+  :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord c, InsertLeft t2 c, Monoid (t2 c), Integral d) => d
   -> FuncRep2 (t a) b c
   -> (t2 (t a), t2 (t a))
   -> (t2 (t a), t2 (t a))
@@ -88,7 +88,7 @@
      where (!partT,!partF) = innerPartitioning frep2 dataF
 
 maximumGroupsClassification1
-  :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord c, Integral d) => d
+  :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord c, InsertLeft t2 c, Monoid (t2 c), Integral d) => d
   -> FuncRep2 (t a) b c
   -> t2 (t a)
   -> (t2 (t a), t2 (t a))
@@ -98,14 +98,13 @@
 
 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
-  -> FuncRep2 (t a) b c
   -> t2 (Result t a b c)
   -> (t2 (Result t a b c), t2 (Result t a b c))
-maximumGroupsClassificationR !nGroups !frep2 data0
+maximumGroupsClassificationR !nGroups dataR
  | nGroups <= 1 = (partT,partF)
- | otherwise = (partT `mappend` (fst . maximumGroupsClassificationR (nGroups - 1) frep2 $ partF),snd . maximumGroupsClassificationR (nGroups - 1) frep2 $ partF)
-     where !maxE0 = F.maximum . mapG transMetrices $ data0
-           (!partT,!partF) = partitionG ((== maxE0) . transMetrices) data0
+ | 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
 
 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.1.0
+version:             0.3.2.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
