first draft on changing to a tree view (not working)