progress on problem 7
tree structure working. there's a bug 'unexpected keyword argument loss'