add automatic hash function creation