hash table implementaion.
fixed some bugs.