'discard' instead of 'erase'
remove test code