new test cases
complete re-write. now works in 2d case.