implemented method for changing the tree menu. this implies showing hierarchical data