A simple batch implementation