add EraseMessages to the API