tests are all out of wack but it all works