Adds advanced repeat functionality