improve management of hash type