yours is basically the same, except you add them to a hashtable and it's just as complex.