collapser added; refactoring