adds new test (untested) and test harness
fixes obvious problems