API:Purge/Sample code 2