added batch generator