improved user group parsing