tidying up tests, still a couple of bugs
tracking down a bug