added min() and max()