went a lot of the way with cpp - rewrote - in python - makes much more
sense, and is much easier!!!