added erase function