added tests for invalid situations