code for new repeat block