fixed unit tests, saved results to a file