removed functions for min and max.