changed lookupSub implementation.