math.min.js working