updated to use list of terms