moved repeat to loop()