Adding full tree code