new logic for include_terms parameter