add our own (minimal) term caching