integration test for this stuff & some clean up