added isError()