modify hash_node function