set up batch repeat structure