Moved the hash-lookup into a separate function, now we have to decide
how to deal with the problem.