calc max path in tree