collapse multiple adjacent spaces