made sure we are destroying the hash table and freeing memory after use