dangerous eraser
improve error handling