treedev calculate