add term trimming code