purge authomatic code