added string grouping functions