Tree

Added main functions