wrote some unit tests around nut conversion, and as always with unit tests, I fixed a few bugs