finished adding a function maker for converting user body variables into
expanded tree variables.