Improved method to show the groups