refactored with class method Term.search