Renamed repeats_callback to repeats_callback_wrapper and added a unit test