Mathtools using js