collapse function

Collapse hyperSpec objects