Added implementation for ht_insert()