implemented delete and purge