add a timesLimit function