Added ind2group function