clarified error handling