added purge feature.