added struct for tree