added draft of repeat functionality