Rebuild tree work, added example