Boundry of multiple rectangles

i have a list of rectangles. and some of them are grouped and some not.
i would like to always have the boundry curve of groups or single ones. as shown in this image

I tried with boundry surface. it works but is really slow. and i will be have a lot more smaler squares and this is no option. is there another way?


it’s a ***** if you just don’t know all the components when you are new to GH
well i managed anyway