adding batches
fixed func ref
stdout logging option