move repeat into own module