updated the changes
simplified the signature of the purge() method