binary tree api for building xtensils