created minmax