Added test cases, changed function name to repeat.