finished pr12 and added many new functions to mathtools