modified to purge by user mode