use standard error checking code