fixed code and tests for Lookup service