more work on math lib