implemented Vectorize function to facilitate turning tree structure into list... -sai