improve and better test group function