commits min and max