added tests for error