implemented purge