updated the math.js library, improved formatting