tests for error checking