Add erase and erase function, bug with erase