updated the hmac_hash logic