implement erase cmd