-- code and test to list groups