refactored and renamed repeat functionality
start to fix tests