write hash