delete the redundant codes when using setCurrTerm