some code cleaned
added lookupValue method