Update to minmax

furtherwork