combine 3 hash_init functions