Added repeat mode