Added function to print all group names