Add tree constructor
impl tree constructor