refactored TableLookUp