refactoring of Facet#terms