solved Min_max, no importing allowed