refactored the groups tab