putting flattenTermsTwo back