change hash key generation function,and relative function