add function _prtable_lookup and unit test