helpers and tree for sidebar