refactoring, adding ReferenceLookup class