factorize groups management
Number for count in groups should be smaller