added function to add top tree node with back link