#39: More work on the math