get tree depth