added some new collapsing functions - they're working