implemented repeat.