add build tree function