added min and max in Math