use khash instead of glib hash