merge batch.queue and batch.updateAndQueue to one function set