add hashtable and finish some basic functions