made repetitions a parameter