getting lookups working for inference.  Some encapsulation to make code here clearer