updated erase method
updated erase method