modified function name and add errer look up unit