set cookie clear to every 5 iterations