implemented grouping selected components