added option to collapse subtrees by default