robustify search term removal code - previousl, hitting -term could erase all terms and keep decrementing the variable keeping track of terms