This is a simple hash table implementation, it could be a lot better though, but still, it illustrates the principle ... check out the code, should be clear enough I'd say ...