add repeat() and a test for it