refactor to support new lookup