added functionality to add to hashtable