batch snippet