Implemented the 'repeat' block