make the recursive repeat function async.