added to error handling