add destroy method, change uncaught error handling