error handling modified.