add name attribute to tree and tree import