made the repeat functionality more rugged with user manipulation