add some license foo and prepare for handling sparse trees