generalize term generation