finished script that runs tests. getting about 80% branch coverage.