added tests for malformed data