changes error handling