core of the tree is an account accounting: http://simplestudies.com/repository/lectures/14.16-accounting-cost-flow.png