Adding tests and data files
Fixed issue, inverting incorrectly