modify first version of purge, add purge2