demo the erase function