try calculate using tree