auto tree resizing