support for threaded data, with collapse and expand